let table = new St.Widget({ style_class: 'keyring-dialog-control-table',
layout_manager: layout });
layout.hookup_style(table);
+ let rtl = table.get_text_direction() == Clutter.TextDirection.RTL;
let row = 0;
if (this.prompt.password_visible) {
y_align: Clutter.ActorAlign.CENTER });
label.set_text(_("Password:"));
label.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
- layout.attach(label, 0, row, 1, 1);
this._passwordEntry = new St.Entry({ style_class: 'prompt-dialog-password-entry',
text: '',
can_focus: true,
this._passwordEntry.clutter_text.set_password_char('\u25cf'); // ● U+25CF BLACK CIRCLE
ShellEntry.addContextMenu(this._passwordEntry, { isPassword: true });
this._passwordEntry.clutter_text.connect('activate', Lang.bind(this, this._onPasswordActivate));
- layout.attach(this._passwordEntry, 1, row, 1, 1);
+
+ if (rtl) {
+ layout.attach(this._passwordEntry, 0, row, 1, 1);
+ layout.attach(label, 1, row, 1, 1);
+ } else {
+ layout.attach(label, 0, row, 1, 1);
+ layout.attach(this._passwordEntry, 1, row, 1, 1);
+ }
row++;
} else {
this._passwordEntry = null;
x_align: Clutter.ActorAlign.START,
y_align: Clutter.ActorAlign.CENTER }));
label.set_text(_("Type again:"));
- layout.attach(label, 0, row, 1, 1);
this._confirmEntry = new St.Entry({ style_class: 'prompt-dialog-password-entry',
text: '',
can_focus: true,
this._confirmEntry.clutter_text.set_password_char('\u25cf'); // ● U+25CF BLACK CIRCLE
ShellEntry.addContextMenu(this._confirmEntry, { isPassword: true });
this._confirmEntry.clutter_text.connect('activate', Lang.bind(this, this._onConfirmActivate));
- layout.attach(this._confirmEntry, 1, row, 1, 1);
+ if (rtl) {
+ layout.attach(this._confirmEntry, 0, row, 1, 1);
+ layout.attach(label, 1, row, 1, 1);
+ } else {
+ layout.attach(label, 0, row, 1, 1);
+ layout.attach(this._confirmEntry, 1, row, 1, 1);
+ }
row++;
} else {
this._confirmEntry = null;
let choice = new CheckBox.CheckBox();
this.prompt.bind_property('choice-label', choice.getLabelActor(), 'text', GObject.BindingFlags.SYNC_CREATE);
this.prompt.bind_property('choice-chosen', choice.actor, 'checked', GObject.BindingFlags.SYNC_CREATE | GObject.BindingFlags.BIDIRECTIONAL);
- layout.attach(choice.actor, 1, row, 1, 1);
+ layout.attach(choice.actor, rtl ? 0 : 1, row, 1, 1);
row++;
}
x_align: Clutter.ActorAlign.START });
warning.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
warning.clutter_text.line_wrap = true;
- layout.attach(warning, 1, row, 1, 1);
+ layout.attach(warning, rtl ? 0 : 1, row, 1, 1);
this.prompt.bind_property('warning-visible', warning, 'visible', GObject.BindingFlags.SYNC_CREATE);
this.prompt.bind_property('warning', warning, 'text', GObject.BindingFlags.SYNC_CREATE);